package com.zhoug.viewpermission;

import java.io.Serializable;

/**
 * @author: zhoug
 * @since: 2025-06-13
 */
public class ViewPermission implements Serializable {

    public static final String ADD = "button:add";
    public static final String UPDATE = "button:update";
    public static final String DELETE = "button:delete";
    public static final String AUDIT = "button:audit";
    public static final String IMPORT = "button:import";
    public static final String EXPORT = "button:export";

    private String key;//权限标志
    private String permissionText;//权限字符串
    private boolean addPermission;//增加
    private boolean updatePermission;//修改
    private boolean deletePermission;//删除
    private boolean auditPermission;//审核
    private boolean importPermission;//导入
    private boolean exportPermission;//导出

    public static final ViewPermission EMPTY = new ViewPermission();

    public ViewPermission() {
    }

    public ViewPermission(String key) {
        this.key = key;
    }

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public boolean isAddPermission() {
        return addPermission;
    }

    public void setAddPermission(boolean addPermission) {
        this.addPermission = addPermission;
    }

    public boolean isUpdatePermission() {
        return updatePermission;
    }

    public void setUpdatePermission(boolean updatePermission) {
        this.updatePermission = updatePermission;
    }

    public boolean isDeletePermission() {
        return deletePermission;
    }

    public void setDeletePermission(boolean deletePermission) {
        this.deletePermission = deletePermission;
    }

    public boolean isAuditPermission() {
        return auditPermission;
    }

    public void setAuditPermission(boolean auditPermission) {
        this.auditPermission = auditPermission;
    }

    public boolean isImportPermission() {
        return importPermission;
    }

    public void setImportPermission(boolean importPermission) {
        this.importPermission = importPermission;
    }

    public boolean isExportPermission() {
        return exportPermission;
    }

    public void setExportPermission(boolean exportPermission) {
        this.exportPermission = exportPermission;
    }

    public String getPermissionText() {
        return permissionText;
    }

    public void setPermissionText(String permissionText) {
        this.permissionText = permissionText;
    }
}
